import React, { Component } from 'react';

class Amount extends Component {
    
    constructor(props){
        super(props);

        this.state = {
            select:this.props.select
        }

    }

    render() {

        let amount = this.props.amount;
        let present = this.props.present;
        let money = this.props.money;

        let style = '';

        if(this.props.select === 0){
            style = 'recharge-row-box';
        } else{
            style = 'recharge-row-box re-select'
        }

        return (
            <div data-money={money} onClick={(e)=>this.props.selectFunc(e)} className={style}>
                    <div data-money={money}  className="recharge-row-box-wrapper">
                       <div data-money={money} className="recharge-title">{amount}饼干</div>
                       <div data-money={money} className="recharge-present">送{present}饼干  <span className="advertise">首充特惠</span></div>
                       <div data-money={money} className="recharge-mount">
                            {money}元
                       </div>
                    </div>
            </div>
        );
    }
}

export default Amount;